<?php

class SysRolesTable extends Doctrine_Table
{
    public function getRoleById($role_id) {
        
        $q = $this->createQuery()
                ->where("acct_set_id = ? ", sfContext::getInstance()->getUser()->getAttribute("acct_set"))
                ->addWhere("id = ?", $role_id);
        
        return $q->fetchOne();
    }
}
